@extends('admin.header')
@section('title','添加专家界面')
@section('content')
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <div class="col-md-12" id="content">
                <div class="app_content_div" id="app_content_div_301Index">
                    <h3>列表</h3>
                </div>
                <div>
                    <div style="float:right;">
                        <a href="/expert/add-list" type="button" class="btn btn-primary">新增专家</a>
                    </div>
                </div>
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>id</th>
                        <th>姓名</th>
                        <th style="width: 50px">性别</th>
                        <th >职称</th>
                        <th>科室</th>
                        <th>医院</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    @foreach($expert as $v)
                    <tbody>
                    <tr>
                        <th scope="row">{{$v->id}}</th>
                        <td>{{$v->name}}</td>
                        <td>{{$v->sex}}</td>
                        <td>{{$v->position}}</td>
                        <td>{{$v->department}}</td>
                        <td>{{$v->hospital}}</td>

                        <td>
                            <a href="/expert/edit-list/{{$v->id}}"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></a>&nbsp;
                            <a onclick="delUser('/expert/delete-list/{{$v->id}}')"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a>
                        </td>
                    </tr>
                    </tbody>
                    @endforeach

                </table>

                <div class="center">{{$expert->links('page2')}}</div>

            </div>
        </div>
    </div>
</div>
</body>
        <script>
        function delUser(url){
        if(confirm('确定要删除该专家吗？')){
        window.location.href = url;
        }
        }
        </script>

</html>
@endsection
